from flask import Flask,render_template,request
from panduan import panduan_login
app = Flask(__name__)

@app.route("/entry")
def hello_entry() -> 'html':
	return render_template('entry.html',the_title="	Welcome!")


@app.route("/search",methods = ["POST"])
def hello_search():
	weekday = request.form["weekday"]
	time = request.form["time"]
	a = panduan_login(weekday, time)
	if a == "true":
		from pymysql import connect
		con = connect(host="localhost",port=3306,user="root",password="123456",db="kcb")
		cursor2 = con.cursor()
		sql = "select * from information where = %s"%item
		cursor2.execute(sql)
		res = cursor2.fetchall()
		return sql
	else:
		return "查询无效"


if __name__ == "__main__":
	app.run()